checkArgumentFinite

open fun checkArgumentFinite(value: Float, @NonNull valueName: String): Float(source)

Ensures that the argument floating point value is a finite number.

A finite number is defined to be both representable (that is, not NaN) and not infinite (that is neither positive or negative infinity).

Return

the validated floating point value

Parameters

value

a floating point value

valueName

the name of the argument to use if the check fails

Throws

if value was not finite